package cn.ddiancan.xddcloud.psc.mq;

import java.util.List;

import cn.ddiancan.xddcloud.psc.mq.constants.ListenerType;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.remoting.protocol.heartbeat.MessageModel;

public abstract class AbstractMessageHandler implements IConfigHandler {

    protected MessageModel getMessageModel() {
        return MessageModel.CLUSTERING;
    }

    protected ListenerType listenerType() {
        return ListenerType.CONCURRENTLY;
    }

    public boolean isEnableCustomer() {
        return true;
    }

    public boolean isEnableProducer() {
        return true;
    }

    public abstract void handler(List<MessageExt> message);
}
